// 会议管理专用接口
import request from '@/utils/request'

export const getDataPlnel = () => {
  return request.get('/conference/search/Info')
}

// 获取表格数据
export const getTable = ({ page, size, cfCode, cfName, sponsorName, startTime1, startTime2 }) => {
  return request.get('/conference/search/one', {
    params: {
      page,
      size,
      cfCode,
      cfName,
      sponsorName,
      startTime1,
      startTime2

    }
  })
}

// 获取详细信息
export const getDetail = ({ cfId }) => {
  return request.get('/conference/detail', {
    params: {
      cfId
    }
  })
}
// 获取会议参会人信息
export const getParticipants = ({ cfId, page, size }) => {
  return request.get('/conference/participant/detail', {
    params: {
      cfId,
      page,
      size
    }
  })
}
// 获取会议文档列表
export const getDocuments = ({ cfId, page, size }) => {
  return request.get('/conference/file/detail', {
    params: {
      cfId,
      page,
      size
    }
  })
}

// 导出会议文档
export const exportDocument = ({ cfIds, timeZone }) => {
  return request.get('/conference/export/meeting', {
    params: {
      cfIds,
      timeZone
    },
    responseType: 'blob'

  })
}

// 下载会议文档
export const downloadDocument = ({ fileIds }) => {
  return request.get('/conference/download', {
    params: {
      fileIds
    },
    responseType: 'blob'

  })
}

// 删除会议文档
export const deleteDocument = ({ fileId, cfId }) => {
  return request.get(`/conference/delete/${fileId}`, {
    params: {
      cfId
    }
  })
}
